{% extends 'base.html' %}
{% block header %}
<h1>{% block title %}{{ name }}{% endblock %}</h1>
{% endblock %}

{% block content %}
<link rel="stylesheet" href="{{ url_for('static', filename='codemirror/codemirror.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='codemirror/theme/ayu-dark.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='codemirror/theme/seti.css') }}">
<script src="../../static/codemirror/codemirror.js"></script>
<script src="../../static/codemirror/mode/yaml/yaml.js"></script>
<article class="post">
    <header>
        <div>
            <textarea id="code" name="code">{{ posts }}</textarea>
        </div>
    </header>
</article>
<script type="text/javascript">

    var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
        mode: "text/yaml",
        theme: "ayu-dark",
        lineNumbers: true,
        // tabSize: 1,
        readOnly: false,
        lineWrapping: true,
        // gutters: ["CodeMirror-lint-markers"],
    });
</script>
{% endblock %}


